<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		h1 {
			width: 500px;
			height: 300px;
			line-height: 300px;
			background-image: linear-gradient(30deg, red, blue, green);
			margin: 0 auto;
			text-align: center;
			font-size: 80px;
			color: yellow;
		}

		@media print {
			h1 {
				background: transparent;
			}
		}

		@media screen {
			h1 {
				color: white;
			}
		}
	</style>
</head>
<body>
	<h1>新年快乐</h1>
</body>
</html>